#!/usr/bin/env/ python
# -*- coding: utf-8 -*-

"""
@author: super
@software: PyCharm
@file: property
@time: 2021/11/19 13:48
"""
class Student():
	def __init__(self):
		self.__age = 0

	@property
	def age(self):
		print("获取age！")
		return self.__age

	@age.setter
	def age(self, age):
		print("设置age！")
		self.__age = age

stu = Student()
print(stu.age)
stu.age = 20
print(stu.age)